package com.aofei.pangu.api;



import io.reactivex.Observable;
import me.goldze.mvvmhabit.authorization.Token;
import me.goldze.mvvmhabit.http.BaseResponse;
import retrofit2.Call;
import retrofit2.http.Query;
import retrofit2.http.POST;

public interface AccountApiService {

    /**
     * 登录接口
     * @param nationCode
     * @param mobile
     * @param password
     * @param captcha
     * @return
     */
    @POST("api/v1/login")
    Observable<BaseResponse<Token>> login(@Query("nationCode") String nationCode, @Query("mobile")String mobile, @Query("password") String password, @Query("captcha")String captcha );

    /**
     * 刷新token，获取新的token
     * @param refresh_token
     * @return
     */
    @POST("api/v1/refresh_token")
    Call<BaseResponse<Token>> refreshToken(@Query("refresh_token") String refresh_token );
}
